package com.example.common.result;

import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public enum ResultCodeEnum {

    SUCCESS(true, 200,"成功"),
    ERROR(false, 410, "服务器内部错误"),
    CREATED(true,201,"创建成功"),
    UNCREATED(false,411,"创建失败"),
    DELETED(true, 202, "删除成功"),
    UNDELETED(false, 412, "删除失败"),
    UPDATED(true, 203, "修改成功"),
    UNUPDATED(false, 413, "修改失败"),
    UNAUTHORIZED(false, 401, "未授权"),
    FORBIDDEN(false, 403, "被禁止访问");



    private Boolean success;

    private Integer code;

    private String message;

    ResultCodeEnum(Boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

}
